package ljl.alg.jianzhioffer.round2;

import java.util.ArrayList;
import java.util.List;
/**
 * 不是特别有意思
 * */
public class _45_arrange_numbers_to_a_single_min_number {
    
    public String minNumber(int[] nums) {
        List<String> list = new ArrayList<>();
        for (int n : nums) {
            list.add(String.valueOf(n));
        }
        list.sort((x, y) -> {
            return (x + "" + y).compareTo(y + "" + x);
        });
        return String.join("", list);
    }
}
